export const defaultOptions = {
  controlPosition: 'right',// 控制位置
  append: false,// 追加
  actionButtons: [],// 动作按钮
  controlOrder: [// 控件集合
    'autocomplete',
    'button',
    'checkbox',
    'checkbox-group',
    'date',
    'file',
    'header',
    'hidden',
    'number',    
    'paragraph',
    'radio-group',
    'select',
    'text',
    'textarea',
  ],
  dataType: 'json',// 数据类型
  // 禁用字段数组
  disableFields: [],
  disabledAttrs: [],
  disabledActionButtons: [], // save,data,clear
  disabledFieldButtons: {},
  editOnAdd: false,
  defaultFields: [],
  fields: [],
  fieldRemoveWarn: false,
  inputSets: [],
  replaceFields: [],
  roles: {
    1:'超级管理员',
    2:'管理员',
    3:'编辑人员',
    4:'设计人员'
  },
  notify: {
    error: message => console.error(message),
    success: message => console.log(message),
    warning: message => console.warn(message),
  },
  onSave: (evt, formData) => null,
  onClearAll: () => null,
  prepend: false,
  sortableControls: false,
  stickyControls: {
    enable: true,
    offset: {
      top: 5,
      bottom: 'auto',
      right: 'auto',
    },
  },
  templates: {},
  showActionButtons: true,
  typeUserDisabledAttrs: {},
  typeUserAttrs: {},
  typeUserEvents: {},
  prefix: 'layui-',
}

export const styles = {
  btn: ['default', 'danger', 'info', 'primary', 'success', 'warning'],
}

export const defaultI18n = {
  location: '',
  langs: ['zh-CN'],
  preloaded: {
    'en-US': {
      addOption: 'Add Option +',
      allFieldsRemoved: 'All fields were removed.',
      allowMultipleFiles: 'Allow users to upload multiple files',
      autocomplete: 'Autocomplete',
      button: 'Button',
      cannotBeEmpty: 'This field cannot be empty',
      checkboxGroup: 'Checkbox Group',
      checkbox: 'Checkbox',
      checkboxes: 'Checkboxes',
      className: 'Class',
      clearAllMessage: 'Are you sure you want to clear all fields?',
      clear: 'Clear',
      close: 'Close',
      content: 'Content',
      copy: 'Copy To Clipboard',
      copyButton: '&#43;',
      copyButtonTooltip: 'Copy',
      dateField: 'Date Field',
      description: 'Help Text',
      descriptionField: 'Description',
      devMode: 'Developer Mode',
      editNames: 'Edit Names',
      editorTitle: 'Form Elements',
      editXML: 'Edit XML',
      enableOther: 'Enable &quot;Other&quot;',
      enableOtherMsg: 'Let users to enter an unlisted option',
      fieldNonEditable: 'This field cannot be edited.',
      fieldRemoveWarning: 'Are you sure you want to remove this field?',
      fileUpload: 'File Upload',
      formUpdated: 'Form Updated',
      getStarted: 'Drag or click a field from the right to this area',
      header: 'Header',
      hide: 'Edit',
      hidden: 'Hidden Input',
      inline: 'Inline',
      inlineDesc: 'Display {type} inline',
      label: 'Label',
      labelEmpty: 'Field Label cannot be empty',
      limitRole: 'Limit access to one or more of the following roles:',  
      mandatory: 'Mandatory',
      maxlength: 'Max Length',
      minOptionMessage: 'This field requires a minimum of 2 options',
      minSelectionRequired: 'Minimum {min} selections required',
      multipleFiles: 'Multiple Files',
      name: 'Name',
      no: 'No',
      noFieldsToClear: 'There are no fields to clear',
      number: 'Number',
      off: 'Off',
      on: 'On',
      option: 'Option',
      options: 'Options',
      optional: 'optional',
      optionLabelPlaceholder: 'Label',
      optionValuePlaceholder: 'Value',
      optionEmpty: 'Option value required',
      other: 'Other',
      paragraph: 'Paragraph',
      placeholder: 'Placeholder',
      'placeholder.value': 'Value',
      'placeholder.label': 'Label',
      'placeholder.text': '',
      'placeholder.textarea': '',
      'placeholder.email': 'Enter you email',
      'placeholder.placeholder': '',
      'placeholder.className': 'space separated classes',
      'placeholder.password': 'Enter your password',
      preview: 'Preview',
      radioGroup: 'Radio Group',
      radio: 'Radio',
      removeMessage: 'Remove Element',
      removeOption: 'Remove Option',
      remove: '&#215;',
      required: 'Required',
      requireValidOption: 'Only accept a pre-defined Option',     
      richText: 'Rich Text Editor',
      roles: 'Access',
      rows: 'Rows',
      save: 'Save',
      selectOptions: 'Options',
      select: 'Select',
      selectColor: 'Select Color',
      selectionsMessage: 'Allow Multiple Selections',
      size: 'Size',
      'size.xs': 'Extra Small',
      'size.sm': 'Small',
      'size.m': 'Default',
      'size.lg': 'Large',
      style: 'Style',
      'styles.btn.default': 'Default',
      'styles.btn.danger': 'Danger',
      'styles.btn.info': 'Info',
      'styles.btn.primary': 'Primary',
      'styles.btn.success': 'Success',
      'styles.btn.warning': 'Warning',
      subtype: 'Type',
      text: 'Text Field',
      textArea: 'Text Area',
      toggle: 'Toggle',
      warning: 'Warning!',
      value: 'Value',
      viewJSON: '{  }',
      viewXML: '&lt;/&gt;',
      yes: 'Yes',
    },
    'zh-CN': {
      addOption: '添加选择 +',
      allFieldsRemoved: '删除所有字段.',
      allowMultipleFiles: '允许用户上载多个文件',
      autocomplete: '自动完成',
      button: '按钮',
      cannotBeEmpty: '此字段不能为空',
      checkboxGroup: '复选框组',
      checkbox: '复选框',
      checkboxes: '复选框',
      className: '样式名称',
      clearAllMessage: '确实要清除所有字段吗？',
      clear: '清空',
      close: '关闭',
      content: '内容',
      copy: '复制到剪贴板',
      copyButton: '&#43;',
      copyButtonTooltip: 'Copy',
      dateField: '日期字段',
      description: '帮助文字',
      descriptionField: '描述',
      devMode: '开发者模式',
      editNames: '修改名称',
      editorTitle: '表单元素',
      editXML: '修改 XML',
      enableOther: 'Enable &quot;Other&quot;',
      enableOtherMsg: '请输入未选择选项',
      fieldNonEditable: '无法编辑此字段.',
      fieldRemoveWarning: '确认要删除此字段?',
      fileUpload: '文件上传',
      formUpdated: '更新表单',
      getStarted: '从右侧拖动或单击字段到该区域',
      header: '页眉',
      hide: '修改',
      hidden: '隐藏输入框',
      inline: '内联',
      inlineDesc: '显示 {type} 内联',
      label: '标签',
      labelEmpty: '标签字段不能为空',
      limitRole: '限制访问以下角色中的一个或多个：',  
      mandatory: '强制性',
      maxlength: '最大字数',
      minOptionMessage: '这个字段至少需要2个选项',
      minSelectionRequired: '所需的最小 {min} 选择',
      multipleFiles: '多文件',
      name: '名称',
      no: 'No',
      noFieldsToClear: '这里没有明确的字段',
      number: '数字',
      off: 'Off',
      on: 'On',
      option: '选项',
      options: '选项',
      optional: '可选择的',
      optionLabelPlaceholder: '标签',
      optionValuePlaceholder: '值',
      optionEmpty: '必须要选择一个值',
      other: '其他',
      paragraph: '段落',
      placeholder: '占位提示',
      'placeholder.value': 'Value',
      'placeholder.label': 'Label',
      'placeholder.text': '',
      'placeholder.textarea': '',
      'placeholder.email': '输入邮件',
      'placeholder.placeholder': '',
      'placeholder.className': 'space separated classes',
      'placeholder.password': '输入密码',
      preview: '预览',
      radioGroup: '单选组',
      radio: '单选',
      removeMessage: '删除元素',
      removeOption: '删除选项',
      remove: '&#215;',
      required: '必填项',
      requireValidOption: '只接受预定义的选项',     
      richText: '富文本编辑器',
      roles: 'Access',
      rows: '行',
      save: '保存',
      selectOptions: '选项',
      select: '选择',
      selectColor: '选择颜色',
      selectionsMessage: '允许多重选择',
      size: '大小',
      'size.xs': 'Extra Small',
      'size.sm': 'Small',
      'size.m': 'Default',
      'size.lg': 'Large',
      style: 'Style',
      'styles.btn.default': 'Default',
      'styles.btn.danger': 'Danger',
      'styles.btn.info': 'Info',
      'styles.btn.primary': 'Primary',
      'styles.btn.success': 'Success',
      'styles.btn.warning': 'Warning',
      subtype: '类型',
      text: '文本类型',
      textArea: '文本区域',
      toggle: '切换',
      warning: '警告!',
      value: 'Value',
      viewJSON: '{  }',
      viewXML: '&lt;/&gt;',
      yes: 'Yes',
    }
  },
}

export const config = {}
